/*
 * Decompiled with CFR 0.150.
 * 
 * Could not load the following classes:
 *  cn.hutool.core.date.DateUtil
 *  cn.hutool.core.util.ObjectUtil
 *  com.alibaba.fastjson.JSON
 *  com.alibaba.fastjson.JSONObject
 *  de.felixroske.jfxsupport.FXMLController
 *  javafx.beans.value.ChangeListener
 *  javafx.beans.value.ObservableValue
 *  javafx.collections.FXCollections
 *  javafx.collections.ObservableList
 *  javafx.event.EventHandler
 *  javafx.fxml.FXML
 *  javafx.fxml.Initializable
 *  javafx.scene.Node
 *  javafx.scene.control.Alert
 *  javafx.scene.control.Alert$AlertType
 *  javafx.scene.control.Button
 *  javafx.scene.control.CheckBox
 *  javafx.scene.control.ChoiceBox
 *  javafx.scene.control.DatePicker
 *  javafx.scene.control.Pagination
 *  javafx.scene.control.ScrollPane
 *  javafx.scene.control.TableCell
 *  javafx.scene.control.TableColumn
 *  javafx.scene.control.TableView
 *  javafx.scene.control.TextField
 *  javafx.scene.control.cell.PropertyValueFactory
 *  javafx.scene.input.KeyCode
 *  javafx.scene.input.KeyEvent
 *  javafx.scene.layout.VBox
 *  javafx.stage.Modality
 *  javafx.util.Callback
 *  javafx.util.StringConverter
 *  org.springframework.beans.factory.annotation.Autowired
 *  org.springframework.util.CollectionUtils
 */
package com.gys.controller.deviceInfo;

import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.gys.GysApplication;
import com.gys.common.business.DeviceInfoUtil;
import com.gys.common.business.SaleScheduleSettingUtil;
import com.gys.common.data.HttpJson;
import com.gys.common.data.PageInfo;
import com.gys.common.util.CacheUtil;
import com.gys.common.util.CommonUtil;
import com.gys.common.util.ConstUtil;
import com.gys.controller.BaseController;
import com.gys.controller.dataManger.ControllerManger;
import com.gys.controller.deviceInfo.AddDeviceInfoController;
import com.gys.controller.deviceInfo.EditDeviceInfoController;
import com.gys.controller.index.IndexController;
import com.gys.data.deviceInfo.DeviceInfoInData;
import com.gys.data.deviceInfo.DeviceInfoOutData;
import com.gys.data.example.GetLoginStoreOutData;
import com.gys.data.example.GetUserOutData;
import com.gys.data.saleScheduleSetting.GetSaleScheduleInData;
import com.gys.view.deviceInfo.addDeviceInfoView;
import com.gys.view.deviceInfo.editDeviceInfoView;
import de.felixroske.jfxsupport.FXMLController;
import java.net.URL;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.ResourceBundle;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.Node;
import javafx.scene.control.Alert;
import javafx.scene.control.Button;
import javafx.scene.control.CheckBox;
import javafx.scene.control.ChoiceBox;
import javafx.scene.control.DatePicker;
import javafx.scene.control.Pagination;
import javafx.scene.control.ScrollPane;
import javafx.scene.control.TableCell;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.control.TextField;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import javafx.scene.layout.VBox;
import javafx.stage.Modality;
import javafx.util.Callback;
import javafx.util.StringConverter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;

@FXMLController
public class DeviceInfoController
extends BaseController
implements Initializable {
    private final int pageSize = ConstUtil.DEFAULT_PAGESIZE;
    private final int defaultPageCount = ConstUtil.DEFAULT_PAGECOUNT;
    private ObservableList<DeviceInfoOutData> observableTableList = FXCollections.observableArrayList(new ArrayList());
    @FXML
    private Button addBtn;
    @FXML
    private Button editBtn;
    @FXML
    private Pagination pagination;
    @FXML
    private TextField inpGsdiName;
    @FXML
    private ChoiceBox<GetUserOutData> inpGsthUpdateEmp;
    @FXML
    private DatePicker inpGsdiStartDate;
    @FXML
    private TableColumn<DeviceInfoOutData, String> index;
    @FXML
    private TableColumn<DeviceInfoOutData, String> gsthBrName;
    @FXML
    private TableColumn<DeviceInfoOutData, String> gsdiId;
    @FXML
    private TableColumn<DeviceInfoOutData, String> gsdiName;
    @FXML
    private TableColumn<DeviceInfoOutData, String> gsdiModel;
    @FXML
    private TableColumn<DeviceInfoOutData, String> gsdiFactory;
    @FXML
    private TableColumn<DeviceInfoOutData, String> gsdiStartDate;
    @FXML
    private TableColumn<DeviceInfoOutData, String> gsdiQty;
    @FXML
    private TableColumn<DeviceInfoOutData, String> gsthUpdateEmp;
    @FXML
    private TableColumn<DeviceInfoOutData, String> gsdiInstruction;
    @FXML
    private TableColumn<DeviceInfoOutData, String> gsdiQualify;
    @FXML
    private TableColumn<DeviceInfoOutData, String> gsdiCheck;
    @FXML
    private TableColumn<DeviceInfoOutData, CheckBox> deviceInfoCheckBox;
    @FXML
    private TableView<DeviceInfoOutData> tableView;
    @FXML
    private ScrollPane scrollPane;
    @FXML
    private VBox vBox;
    @Autowired
    private IndexController indexController;
    @Autowired
    private AddDeviceInfoController addDeviceInfoController;
    @Autowired
    private EditDeviceInfoController editDeviceInfoController;

    public void initialize(URL location, ResourceBundle resources) {
        this.scrollPane.setPrefWidth(this.getContentWidth());
        this.scrollPane.setPrefHeight(this.getContentHeight());
        this.vBox.setPrefWidth(this.getContentWidth());
        this.vBox.setPrefHeight(this.getContentHeight());
        this.tableView.setPrefWidth(this.getContentWidth());
        this.pagination.setPrefWidth(this.getContentWidth());
        ControllerManger.controllerMap.put(this.getClass().getSimpleName(), this);
        StringConverter converter = CommonUtil.dataPickerFormat("yyyyMMdd");
        this.inpGsdiStartDate.setConverter(converter);
        this.pagination.setPageFactory((Callback)new Callback<Integer, Node>(){

            public Node call(Integer pageNum) {
                return DeviceInfoController.this.initTable(pageNum);
            }
        });
        GetSaleScheduleInData inData = new GetSaleScheduleInData();
        inData.setClientId(((GetUserOutData)CacheUtil.get("logInUser")).getClient());
        inData.setGsegBrId(((GetLoginStoreOutData)CacheUtil.get("store")).getStoCode());
        HttpJson httpJson = SaleScheduleSettingUtil.queryUser(CommonUtil.convertToMap(inData));
        if (!httpJson.isSuccess()) {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", httpJson.getMsg());
            alert.showAndWait();
            return;
        }
        List userList = JSON.parseArray((String)httpJson.getMsg(), GetUserOutData.class);
        this.inpGsthUpdateEmp.setItems(FXCollections.observableArrayList((Collection)userList));
        this.inpGsthUpdateEmp.converterProperty().set(new StringConverter<GetUserOutData>(){

            public String toString(GetUserOutData object) {
                return object.getLoginName();
            }

            public GetUserOutData fromString(String string) {
                return null;
            }
        });
        this.init();
    }

    @Override
    public void init() {
        this.indexController.scrollContentPane.setOnKeyReleased((EventHandler)new EventHandler<KeyEvent>(){

            public void handle(KeyEvent e) {
                if (e.getCode() == KeyCode.ENTER) {
                    DeviceInfoController.this.sureAction();
                } else if (e.getCode() == KeyCode.F1) {
                    DeviceInfoController.this.addDeviceInfo();
                } else if (e.getCode() == KeyCode.F3) {
                    DeviceInfoController.this.editDeviceInfo();
                }
                e.consume();
            }
        });
    }

    public TableView<DeviceInfoOutData> initTable(int pageNum) {
        DeviceInfoInData inData = new DeviceInfoInData();
        inData.setPageNum(pageNum + 1);
        inData.setPageSize(this.pageSize);
        if (ObjectUtil.isNotEmpty(this.inpGsdiName.getText())) {
            inData.setGsdiName(this.inpGsdiName.getText());
        }
        if (ObjectUtil.isNotNull(this.inpGsthUpdateEmp.getValue())) {
            inData.setGsthUpdateEmp(((GetUserOutData)this.inpGsthUpdateEmp.getValue()).getUserId());
        }
        if (ObjectUtil.isNotEmpty(this.inpGsdiStartDate.getValue())) {
            inData.setGsdiStartDate(DateUtil.format((Date)DateUtil.parse((String)((LocalDate)this.inpGsdiStartDate.getValue()).toString()), (String)"yyyyMMdd"));
        }
        PageInfo pageInfo = null;
        HttpJson rsp = DeviceInfoUtil.getDeviceInfoList(inData);
        if (rsp.isSuccess()) {
            pageInfo = (PageInfo)JSON.parseObject((String)rsp.getMsg(), PageInfo.class);
            if (pageInfo != null && !CollectionUtils.isEmpty(pageInfo.getList())) {
                ArrayList<DeviceInfoOutData> listTemp = new ArrayList<DeviceInfoOutData>();
                for (int i = 0; i < pageInfo.getList().size(); ++i) {
                    String str = JSONObject.toJSONString(pageInfo.getList().get(i));
                    DeviceInfoOutData deviceInfoOutData = (DeviceInfoOutData)JSONObject.parseObject((String)str, DeviceInfoOutData.class);
                    listTemp.add(deviceInfoOutData);
                }
                pageInfo.setList(listTemp);
            }
        } else {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", rsp.getMsg());
            alert.showAndWait();
            return new TableView();
        }
        List<DeviceInfoOutData> dataList = null;
        if (pageInfo != null && !CollectionUtils.isEmpty(pageInfo.getList())) {
            this.pagination.setPageCount(pageInfo.getPages());
            dataList = pageInfo.getList();
        } else {
            this.pagination.setPageCount(this.defaultPageCount);
            dataList = new ArrayList();
        }
        this.observableTableList.clear();
        this.observableTableList = FXCollections.observableArrayList(dataList);
        this.bingTableCell();
        this.tableView.setItems(this.observableTableList);
        return this.tableView;
    }

    private void bingTableCell() {
        this.index.setCellValueFactory((Callback)new PropertyValueFactory(this.index.getId()));
        this.deviceInfoCheckBox.setCellValueFactory(cellData -> ((DeviceInfoOutData)cellData.getValue()).getDeviceInfoCheckBox().getCustomCheckBox());
        this.deviceInfoCheckBox.setCellFactory(col -> {
            TableCell<DeviceInfoOutData, CheckBox> cell = new TableCell<DeviceInfoOutData, CheckBox>(){

                protected void updateItem(CheckBox item, boolean empty) {
                    super.updateItem(item, empty);
                    this.setGraphic((Node)item);
                    if (item != null) {
                        item.setOnMouseClicked(col -> {
                            if (CollectionUtils.isEmpty((Collection)DeviceInfoController.this.observableTableList)) {
                                return;
                            }
                            int index = this.getIndex();
                            for (int i = 0; i < DeviceInfoController.this.observableTableList.size(); ++i) {
                                if (i == index) continue;
                                ((DeviceInfoOutData)DeviceInfoController.this.observableTableList.get(i)).getDeviceInfoCheckBox().setSelectStatus(false);
                            }
                        });
                    }
                }
            };
            return cell;
        });
        this.gsdiId.setCellValueFactory((Callback)new PropertyValueFactory(this.gsdiId.getId()));
        this.gsdiName.setCellValueFactory((Callback)new PropertyValueFactory(this.gsdiName.getId()));
        this.gsthBrName.setCellValueFactory((Callback)new PropertyValueFactory(this.gsthBrName.getId()));
        this.gsdiModel.setCellValueFactory((Callback)new PropertyValueFactory(this.gsdiModel.getId()));
        this.gsdiFactory.setCellValueFactory((Callback)new PropertyValueFactory(this.gsdiFactory.getId()));
        this.gsdiStartDate.setCellValueFactory((Callback)new PropertyValueFactory(this.gsdiStartDate.getId()));
        this.gsdiQty.setCellValueFactory((Callback)new PropertyValueFactory(this.gsdiQty.getId()));
        this.gsthUpdateEmp.setCellValueFactory((Callback)new PropertyValueFactory("userName"));
        this.gsdiInstruction.setCellValueFactory((Callback)new PropertyValueFactory(this.gsdiInstruction.getId()));
        this.gsdiQualify.setCellValueFactory((Callback)new PropertyValueFactory(this.gsdiQualify.getId()));
        this.gsdiCheck.setCellValueFactory((Callback)new PropertyValueFactory(this.gsdiCheck.getId()));
        this.tableView.getSelectionModel().selectedItemProperty().addListener((ChangeListener)new ChangeListener<DeviceInfoOutData>(){

            public void changed(ObservableValue<? extends DeviceInfoOutData> observable, DeviceInfoOutData oldValue, DeviceInfoOutData newValue) {
                if (CollectionUtils.isEmpty((Collection)DeviceInfoController.this.observableTableList)) {
                    return;
                }
                for (int i = 0; i < DeviceInfoController.this.observableTableList.size(); ++i) {
                    if (i == newValue.getIndex() - 1) {
                        ((DeviceInfoOutData)DeviceInfoController.this.observableTableList.get(i)).getDeviceInfoCheckBox().setSelectStatus(true);
                        continue;
                    }
                    ((DeviceInfoOutData)DeviceInfoController.this.observableTableList.get(i)).getDeviceInfoCheckBox().setSelectStatus(false);
                }
            }
        });
    }

    @FXML
    void sureAction() {
        this.initTable(0);
        this.pagination.setCurrentPageIndex(0);
    }

    @FXML
    private void addDeviceInfo() {
        this.addDeviceInfoController.init();
        GysApplication.showView(addDeviceInfoView.class, (Modality)Modality.APPLICATION_MODAL);
    }

    @FXML
    private void editDeviceInfo() {
        List<Integer> indexList = this.getSelectIndex();
        if (ObjectUtil.isEmpty(indexList)) {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", "\u8bf7\u9009\u62e9\u8bb0\u5f55");
            alert.showAndWait();
            return;
        }
        this.editDeviceInfoController.init();
        GysApplication.showView(editDeviceInfoView.class, (Modality)Modality.APPLICATION_MODAL);
    }

    public List<Integer> getSelectIndex() {
        ArrayList<Integer> ids = new ArrayList<Integer>();
        if (!CollectionUtils.isEmpty(this.observableTableList)) {
            for (DeviceInfoOutData i : this.observableTableList) {
                if (!i.getDeviceInfoCheckBox().isSelected().booleanValue()) continue;
                ids.add(i.getIndex());
            }
        }
        return ids;
    }

    @FXML
    private void reset() {
        this.inpGsdiName.clear();
        this.inpGsthUpdateEmp.setValue(null);
        this.inpGsdiStartDate.setValue(null);
    }

    public int getPageSize() {
        return this.pageSize;
    }

    public int getDefaultPageCount() {
        return this.defaultPageCount;
    }

    public ObservableList<DeviceInfoOutData> getObservableTableList() {
        return this.observableTableList;
    }

    public Button getAddBtn() {
        return this.addBtn;
    }

    public Button getEditBtn() {
        return this.editBtn;
    }

    public Pagination getPagination() {
        return this.pagination;
    }

    public TextField getInpGsdiName() {
        return this.inpGsdiName;
    }

    public ChoiceBox<GetUserOutData> getInpGsthUpdateEmp() {
        return this.inpGsthUpdateEmp;
    }

    public DatePicker getInpGsdiStartDate() {
        return this.inpGsdiStartDate;
    }

    public TableColumn<DeviceInfoOutData, String> getIndex() {
        return this.index;
    }

    public TableColumn<DeviceInfoOutData, String> getGsthBrName() {
        return this.gsthBrName;
    }

    public TableColumn<DeviceInfoOutData, String> getGsdiId() {
        return this.gsdiId;
    }

    public TableColumn<DeviceInfoOutData, String> getGsdiName() {
        return this.gsdiName;
    }

    public TableColumn<DeviceInfoOutData, String> getGsdiModel() {
        return this.gsdiModel;
    }

    public TableColumn<DeviceInfoOutData, String> getGsdiFactory() {
        return this.gsdiFactory;
    }

    public TableColumn<DeviceInfoOutData, String> getGsdiStartDate() {
        return this.gsdiStartDate;
    }

    public TableColumn<DeviceInfoOutData, String> getGsdiQty() {
        return this.gsdiQty;
    }

    public TableColumn<DeviceInfoOutData, String> getGsthUpdateEmp() {
        return this.gsthUpdateEmp;
    }

    public TableColumn<DeviceInfoOutData, String> getGsdiInstruction() {
        return this.gsdiInstruction;
    }

    public TableColumn<DeviceInfoOutData, String> getGsdiQualify() {
        return this.gsdiQualify;
    }

    public TableColumn<DeviceInfoOutData, String> getGsdiCheck() {
        return this.gsdiCheck;
    }

    public TableColumn<DeviceInfoOutData, CheckBox> getDeviceInfoCheckBox() {
        return this.deviceInfoCheckBox;
    }

    public TableView<DeviceInfoOutData> getTableView() {
        return this.tableView;
    }

    public ScrollPane getScrollPane() {
        return this.scrollPane;
    }

    public VBox getVBox() {
        return this.vBox;
    }

    public IndexController getIndexController() {
        return this.indexController;
    }

    public AddDeviceInfoController getAddDeviceInfoController() {
        return this.addDeviceInfoController;
    }

    public EditDeviceInfoController getEditDeviceInfoController() {
        return this.editDeviceInfoController;
    }

    public void setObservableTableList(ObservableList<DeviceInfoOutData> observableTableList) {
        this.observableTableList = observableTableList;
    }

    public void setAddBtn(Button addBtn) {
        this.addBtn = addBtn;
    }

    public void setEditBtn(Button editBtn) {
        this.editBtn = editBtn;
    }

    public void setPagination(Pagination pagination) {
        this.pagination = pagination;
    }

    public void setInpGsdiName(TextField inpGsdiName) {
        this.inpGsdiName = inpGsdiName;
    }

    public void setInpGsthUpdateEmp(ChoiceBox<GetUserOutData> inpGsthUpdateEmp) {
        this.inpGsthUpdateEmp = inpGsthUpdateEmp;
    }

    public void setInpGsdiStartDate(DatePicker inpGsdiStartDate) {
        this.inpGsdiStartDate = inpGsdiStartDate;
    }

    public void setIndex(TableColumn<DeviceInfoOutData, String> index) {
        this.index = index;
    }

    public void setGsthBrName(TableColumn<DeviceInfoOutData, String> gsthBrName) {
        this.gsthBrName = gsthBrName;
    }

    public void setGsdiId(TableColumn<DeviceInfoOutData, String> gsdiId) {
        this.gsdiId = gsdiId;
    }

    public void setGsdiName(TableColumn<DeviceInfoOutData, String> gsdiName) {
        this.gsdiName = gsdiName;
    }

    public void setGsdiModel(TableColumn<DeviceInfoOutData, String> gsdiModel) {
        this.gsdiModel = gsdiModel;
    }

    public void setGsdiFactory(TableColumn<DeviceInfoOutData, String> gsdiFactory) {
        this.gsdiFactory = gsdiFactory;
    }

    public void setGsdiStartDate(TableColumn<DeviceInfoOutData, String> gsdiStartDate) {
        this.gsdiStartDate = gsdiStartDate;
    }

    public void setGsdiQty(TableColumn<DeviceInfoOutData, String> gsdiQty) {
        this.gsdiQty = gsdiQty;
    }

    public void setGsthUpdateEmp(TableColumn<DeviceInfoOutData, String> gsthUpdateEmp) {
        this.gsthUpdateEmp = gsthUpdateEmp;
    }

    public void setGsdiInstruction(TableColumn<DeviceInfoOutData, String> gsdiInstruction) {
        this.gsdiInstruction = gsdiInstruction;
    }

    public void setGsdiQualify(TableColumn<DeviceInfoOutData, String> gsdiQualify) {
        this.gsdiQualify = gsdiQualify;
    }

    public void setGsdiCheck(TableColumn<DeviceInfoOutData, String> gsdiCheck) {
        this.gsdiCheck = gsdiCheck;
    }

    public void setDeviceInfoCheckBox(TableColumn<DeviceInfoOutData, CheckBox> deviceInfoCheckBox) {
        this.deviceInfoCheckBox = deviceInfoCheckBox;
    }

    public void setTableView(TableView<DeviceInfoOutData> tableView) {
        this.tableView = tableView;
    }

    public void setScrollPane(ScrollPane scrollPane) {
        this.scrollPane = scrollPane;
    }

    public void setVBox(VBox vBox) {
        this.vBox = vBox;
    }

    public void setIndexController(IndexController indexController) {
        this.indexController = indexController;
    }

    public void setAddDeviceInfoController(AddDeviceInfoController addDeviceInfoController) {
        this.addDeviceInfoController = addDeviceInfoController;
    }

    public void setEditDeviceInfoController(EditDeviceInfoController editDeviceInfoController) {
        this.editDeviceInfoController = editDeviceInfoController;
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof DeviceInfoController)) {
            return false;
        }
        DeviceInfoController other = (DeviceInfoController)o;
        if (!other.canEqual(this)) {
            return false;
        }
        if (this.getPageSize() != other.getPageSize()) {
            return false;
        }
        if (this.getDefaultPageCount() != other.getDefaultPageCount()) {
            return false;
        }
        ObservableList<DeviceInfoOutData> this$observableTableList = this.getObservableTableList();
        ObservableList<DeviceInfoOutData> other$observableTableList = other.getObservableTableList();
        if (this$observableTableList == null ? other$observableTableList != null : !this$observableTableList.equals(other$observableTableList)) {
            return false;
        }
        Button this$addBtn = this.getAddBtn();
        Button other$addBtn = other.getAddBtn();
        if (this$addBtn == null ? other$addBtn != null : !this$addBtn.equals(other$addBtn)) {
            return false;
        }
        Button this$editBtn = this.getEditBtn();
        Button other$editBtn = other.getEditBtn();
        if (this$editBtn == null ? other$editBtn != null : !this$editBtn.equals(other$editBtn)) {
            return false;
        }
        Pagination this$pagination = this.getPagination();
        Pagination other$pagination = other.getPagination();
        if (this$pagination == null ? other$pagination != null : !this$pagination.equals(other$pagination)) {
            return false;
        }
        TextField this$inpGsdiName = this.getInpGsdiName();
        TextField other$inpGsdiName = other.getInpGsdiName();
        if (this$inpGsdiName == null ? other$inpGsdiName != null : !this$inpGsdiName.equals(other$inpGsdiName)) {
            return false;
        }
        ChoiceBox<GetUserOutData> this$inpGsthUpdateEmp = this.getInpGsthUpdateEmp();
        ChoiceBox<GetUserOutData> other$inpGsthUpdateEmp = other.getInpGsthUpdateEmp();
        if (this$inpGsthUpdateEmp == null ? other$inpGsthUpdateEmp != null : !this$inpGsthUpdateEmp.equals(other$inpGsthUpdateEmp)) {
            return false;
        }
        DatePicker this$inpGsdiStartDate = this.getInpGsdiStartDate();
        DatePicker other$inpGsdiStartDate = other.getInpGsdiStartDate();
        if (this$inpGsdiStartDate == null ? other$inpGsdiStartDate != null : !this$inpGsdiStartDate.equals(other$inpGsdiStartDate)) {
            return false;
        }
        TableColumn<DeviceInfoOutData, String> this$index = this.getIndex();
        TableColumn<DeviceInfoOutData, String> other$index = other.getIndex();
        if (this$index == null ? other$index != null : !this$index.equals(other$index)) {
            return false;
        }
        TableColumn<DeviceInfoOutData, String> this$gsthBrName = this.getGsthBrName();
        TableColumn<DeviceInfoOutData, String> other$gsthBrName = other.getGsthBrName();
        if (this$gsthBrName == null ? other$gsthBrName != null : !this$gsthBrName.equals(other$gsthBrName)) {
            return false;
        }
        TableColumn<DeviceInfoOutData, String> this$gsdiId = this.getGsdiId();
        TableColumn<DeviceInfoOutData, String> other$gsdiId = other.getGsdiId();
        if (this$gsdiId == null ? other$gsdiId != null : !this$gsdiId.equals(other$gsdiId)) {
            return false;
        }
        TableColumn<DeviceInfoOutData, String> this$gsdiName = this.getGsdiName();
        TableColumn<DeviceInfoOutData, String> other$gsdiName = other.getGsdiName();
        if (this$gsdiName == null ? other$gsdiName != null : !this$gsdiName.equals(other$gsdiName)) {
            return false;
        }
        TableColumn<DeviceInfoOutData, String> this$gsdiModel = this.getGsdiModel();
        TableColumn<DeviceInfoOutData, String> other$gsdiModel = other.getGsdiModel();
        if (this$gsdiModel == null ? other$gsdiModel != null : !this$gsdiModel.equals(other$gsdiModel)) {
            return false;
        }
        TableColumn<DeviceInfoOutData, String> this$gsdiFactory = this.getGsdiFactory();
        TableColumn<DeviceInfoOutData, String> other$gsdiFactory = other.getGsdiFactory();
        if (this$gsdiFactory == null ? other$gsdiFactory != null : !this$gsdiFactory.equals(other$gsdiFactory)) {
            return false;
        }
        TableColumn<DeviceInfoOutData, String> this$gsdiStartDate = this.getGsdiStartDate();
        TableColumn<DeviceInfoOutData, String> other$gsdiStartDate = other.getGsdiStartDate();
        if (this$gsdiStartDate == null ? other$gsdiStartDate != null : !this$gsdiStartDate.equals(other$gsdiStartDate)) {
            return false;
        }
        TableColumn<DeviceInfoOutData, String> this$gsdiQty = this.getGsdiQty();
        TableColumn<DeviceInfoOutData, String> other$gsdiQty = other.getGsdiQty();
        if (this$gsdiQty == null ? other$gsdiQty != null : !this$gsdiQty.equals(other$gsdiQty)) {
            return false;
        }
        TableColumn<DeviceInfoOutData, String> this$gsthUpdateEmp = this.getGsthUpdateEmp();
        TableColumn<DeviceInfoOutData, String> other$gsthUpdateEmp = other.getGsthUpdateEmp();
        if (this$gsthUpdateEmp == null ? other$gsthUpdateEmp != null : !this$gsthUpdateEmp.equals(other$gsthUpdateEmp)) {
            return false;
        }
        TableColumn<DeviceInfoOutData, String> this$gsdiInstruction = this.getGsdiInstruction();
        TableColumn<DeviceInfoOutData, String> other$gsdiInstruction = other.getGsdiInstruction();
        if (this$gsdiInstruction == null ? other$gsdiInstruction != null : !this$gsdiInstruction.equals(other$gsdiInstruction)) {
            return false;
        }
        TableColumn<DeviceInfoOutData, String> this$gsdiQualify = this.getGsdiQualify();
        TableColumn<DeviceInfoOutData, String> other$gsdiQualify = other.getGsdiQualify();
        if (this$gsdiQualify == null ? other$gsdiQualify != null : !this$gsdiQualify.equals(other$gsdiQualify)) {
            return false;
        }
        TableColumn<DeviceInfoOutData, String> this$gsdiCheck = this.getGsdiCheck();
        TableColumn<DeviceInfoOutData, String> other$gsdiCheck = other.getGsdiCheck();
        if (this$gsdiCheck == null ? other$gsdiCheck != null : !this$gsdiCheck.equals(other$gsdiCheck)) {
            return false;
        }
        TableColumn<DeviceInfoOutData, CheckBox> this$deviceInfoCheckBox = this.getDeviceInfoCheckBox();
        TableColumn<DeviceInfoOutData, CheckBox> other$deviceInfoCheckBox = other.getDeviceInfoCheckBox();
        if (this$deviceInfoCheckBox == null ? other$deviceInfoCheckBox != null : !this$deviceInfoCheckBox.equals(other$deviceInfoCheckBox)) {
            return false;
        }
        TableView<DeviceInfoOutData> this$tableView = this.getTableView();
        TableView<DeviceInfoOutData> other$tableView = other.getTableView();
        if (this$tableView == null ? other$tableView != null : !this$tableView.equals(other$tableView)) {
            return false;
        }
        ScrollPane this$scrollPane = this.getScrollPane();
        ScrollPane other$scrollPane = other.getScrollPane();
        if (this$scrollPane == null ? other$scrollPane != null : !this$scrollPane.equals(other$scrollPane)) {
            return false;
        }
        VBox this$vBox = this.getVBox();
        VBox other$vBox = other.getVBox();
        if (this$vBox == null ? other$vBox != null : !this$vBox.equals(other$vBox)) {
            return false;
        }
        IndexController this$indexController = this.getIndexController();
        IndexController other$indexController = other.getIndexController();
        if (this$indexController == null ? other$indexController != null : !(this$indexController).equals(other$indexController)) {
            return false;
        }
        AddDeviceInfoController this$addDeviceInfoController = this.getAddDeviceInfoController();
        AddDeviceInfoController other$addDeviceInfoController = other.getAddDeviceInfoController();
        if (this$addDeviceInfoController == null ? other$addDeviceInfoController != null : !(this$addDeviceInfoController).equals(other$addDeviceInfoController)) {
            return false;
        }
        EditDeviceInfoController this$editDeviceInfoController = this.getEditDeviceInfoController();
        EditDeviceInfoController other$editDeviceInfoController = other.getEditDeviceInfoController();
        return !(this$editDeviceInfoController == null ? other$editDeviceInfoController != null : !(this$editDeviceInfoController).equals(other$editDeviceInfoController));
    }

    protected boolean canEqual(Object other) {
        return other instanceof DeviceInfoController;
    }

    public int hashCode() {
        int PRIME = 59;
        int result = 1;
        result = result * 59 + this.getPageSize();
        result = result * 59 + this.getDefaultPageCount();
        ObservableList<DeviceInfoOutData> $observableTableList = this.getObservableTableList();
        result = result * 59 + ($observableTableList == null ? 43 : $observableTableList.hashCode());
        Button $addBtn = this.getAddBtn();
        result = result * 59 + ($addBtn == null ? 43 : $addBtn.hashCode());
        Button $editBtn = this.getEditBtn();
        result = result * 59 + ($editBtn == null ? 43 : $editBtn.hashCode());
        Pagination $pagination = this.getPagination();
        result = result * 59 + ($pagination == null ? 43 : $pagination.hashCode());
        TextField $inpGsdiName = this.getInpGsdiName();
        result = result * 59 + ($inpGsdiName == null ? 43 : $inpGsdiName.hashCode());
        ChoiceBox<GetUserOutData> $inpGsthUpdateEmp = this.getInpGsthUpdateEmp();
        result = result * 59 + ($inpGsthUpdateEmp == null ? 43 : $inpGsthUpdateEmp.hashCode());
        DatePicker $inpGsdiStartDate = this.getInpGsdiStartDate();
        result = result * 59 + ($inpGsdiStartDate == null ? 43 : $inpGsdiStartDate.hashCode());
        TableColumn<DeviceInfoOutData, String> $index = this.getIndex();
        result = result * 59 + ($index == null ? 43 : $index.hashCode());
        TableColumn<DeviceInfoOutData, String> $gsthBrName = this.getGsthBrName();
        result = result * 59 + ($gsthBrName == null ? 43 : $gsthBrName.hashCode());
        TableColumn<DeviceInfoOutData, String> $gsdiId = this.getGsdiId();
        result = result * 59 + ($gsdiId == null ? 43 : $gsdiId.hashCode());
        TableColumn<DeviceInfoOutData, String> $gsdiName = this.getGsdiName();
        result = result * 59 + ($gsdiName == null ? 43 : $gsdiName.hashCode());
        TableColumn<DeviceInfoOutData, String> $gsdiModel = this.getGsdiModel();
        result = result * 59 + ($gsdiModel == null ? 43 : $gsdiModel.hashCode());
        TableColumn<DeviceInfoOutData, String> $gsdiFactory = this.getGsdiFactory();
        result = result * 59 + ($gsdiFactory == null ? 43 : $gsdiFactory.hashCode());
        TableColumn<DeviceInfoOutData, String> $gsdiStartDate = this.getGsdiStartDate();
        result = result * 59 + ($gsdiStartDate == null ? 43 : $gsdiStartDate.hashCode());
        TableColumn<DeviceInfoOutData, String> $gsdiQty = this.getGsdiQty();
        result = result * 59 + ($gsdiQty == null ? 43 : $gsdiQty.hashCode());
        TableColumn<DeviceInfoOutData, String> $gsthUpdateEmp = this.getGsthUpdateEmp();
        result = result * 59 + ($gsthUpdateEmp == null ? 43 : $gsthUpdateEmp.hashCode());
        TableColumn<DeviceInfoOutData, String> $gsdiInstruction = this.getGsdiInstruction();
        result = result * 59 + ($gsdiInstruction == null ? 43 : $gsdiInstruction.hashCode());
        TableColumn<DeviceInfoOutData, String> $gsdiQualify = this.getGsdiQualify();
        result = result * 59 + ($gsdiQualify == null ? 43 : $gsdiQualify.hashCode());
        TableColumn<DeviceInfoOutData, String> $gsdiCheck = this.getGsdiCheck();
        result = result * 59 + ($gsdiCheck == null ? 43 : $gsdiCheck.hashCode());
        TableColumn<DeviceInfoOutData, CheckBox> $deviceInfoCheckBox = this.getDeviceInfoCheckBox();
        result = result * 59 + ($deviceInfoCheckBox == null ? 43 : $deviceInfoCheckBox.hashCode());
        TableView<DeviceInfoOutData> $tableView = this.getTableView();
        result = result * 59 + ($tableView == null ? 43 : $tableView.hashCode());
        ScrollPane $scrollPane = this.getScrollPane();
        result = result * 59 + ($scrollPane == null ? 43 : $scrollPane.hashCode());
        VBox $vBox = this.getVBox();
        result = result * 59 + ($vBox == null ? 43 : $vBox.hashCode());
        IndexController $indexController = this.getIndexController();
        result = result * 59 + ($indexController == null ? 43 : ($indexController).hashCode());
        AddDeviceInfoController $addDeviceInfoController = this.getAddDeviceInfoController();
        result = result * 59 + ($addDeviceInfoController == null ? 43 : ($addDeviceInfoController).hashCode());
        EditDeviceInfoController $editDeviceInfoController = this.getEditDeviceInfoController();
        result = result * 59 + ($editDeviceInfoController == null ? 43 : ($editDeviceInfoController).hashCode());
        return result;
    }

    public String toString() {
        return "DeviceInfoController(pageSize=" + this.getPageSize() + ", defaultPageCount=" + this.getDefaultPageCount() + ", observableTableList=" + this.getObservableTableList() + ", addBtn=" + this.getAddBtn() + ", editBtn=" + this.getEditBtn() + ", pagination=" + this.getPagination() + ", inpGsdiName=" + this.getInpGsdiName() + ", inpGsthUpdateEmp=" + this.getInpGsthUpdateEmp() + ", inpGsdiStartDate=" + this.getInpGsdiStartDate() + ", index=" + this.getIndex() + ", gsthBrName=" + this.getGsthBrName() + ", gsdiId=" + this.getGsdiId() + ", gsdiName=" + this.getGsdiName() + ", gsdiModel=" + this.getGsdiModel() + ", gsdiFactory=" + this.getGsdiFactory() + ", gsdiStartDate=" + this.getGsdiStartDate() + ", gsdiQty=" + this.getGsdiQty() + ", gsthUpdateEmp=" + this.getGsthUpdateEmp() + ", gsdiInstruction=" + this.getGsdiInstruction() + ", gsdiQualify=" + this.getGsdiQualify() + ", gsdiCheck=" + this.getGsdiCheck() + ", deviceInfoCheckBox=" + this.getDeviceInfoCheckBox() + ", tableView=" + this.getTableView() + ", scrollPane=" + this.getScrollPane() + ", vBox=" + this.getVBox() + ", indexController=" + this.getIndexController() + ", addDeviceInfoController=" + this.getAddDeviceInfoController() + ", editDeviceInfoController=" + this.getEditDeviceInfoController() + ")";
    }
}

